import request from '@/utils/request'

const getCourseList = (params: any) => {
  return request({
    url: '/course/list',
    params
  })
}

const changeStatus = (data: any) => {
  return request({
    url: '/course/status',
    method: 'POST',
    data
  })
}

const delCourse = (data: any) => {
  return request({
    url: '/course/remove',
    method: 'POST',
    data
  })
}

const addCourse = (data: any) => {
  return request({
    url: '/course/add',
    method: 'POST',
    data
  })
}

const editCourse = (data: any) => {
  return request({
    url: '/course/edit',
    method: 'POST',
    data
  })
}

export { getCourseList, changeStatus, delCourse, addCourse, editCourse }
